/**
 * 
 */
package com.mindtree.vi.dbaccess.datatypes.problem;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.mindtree.vi.dbaccess.datatypes.Datatype;

/**
 * @author venkatesh
 * 
 */
@Entity
@Table(name = "VI_PROBLEM")
public class Problem implements Datatype {

	@Id
	@Column(name = "problem_ID")
	@GeneratedValue(strategy = GenerationType.TABLE)
	private long problemId;

	@Column(name = "poblem_type")
	@Enumerated(value = EnumType.STRING)
	private ProblemType problemType;

	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = ProblemDesc.class)
	@JoinColumn(name = "problem_desc_id", nullable = false)
	private ProblemDesc problemDescription;

	@Column(name = "IS_REVIEWED")
	private String isReviewed;

	@Column(name = "difficulty_level")
	@Enumerated(value = EnumType.STRING)
	private DifficultyLevel difficultyLevel;

	public String isReviewed() {
		return isReviewed;
	}

	public void setReviewed(String isReviewed) {
		this.isReviewed = isReviewed;
	}

	public long getProblemId() {
		return problemId;
	}

	public void setProblemId(long problemId) {
		this.problemId = problemId;
	}

	public ProblemDesc getProblemDescription() {
		return problemDescription;
	}

	public void setProblemDescription(ProblemDesc problemDescription) {
		this.problemDescription = problemDescription;
	}

	public ProblemType getProblemType() {
		return problemType;
	}

	public void setProblemType(ProblemType problemType) {
		this.problemType = problemType;
	}

	public String getIsReviewed() {
		return isReviewed;
	}

	public void setIsReviewed(String isReviewed) {
		this.isReviewed = isReviewed;
	}

	public DifficultyLevel getDifficultyLevel() {
		return difficultyLevel;
	}

	public void setDifficultyLevel(DifficultyLevel difficultyLevel) {
		this.difficultyLevel = difficultyLevel;
	}

}
